<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class LoginRequest extends FormRequest
{
    public function rules(): array
    {
        $type = request('type');
        switch ($type) {
            case "wx_mini":
                $rule = [
                    'code' => "required",
                ];
            default:
                $rule = [];
        }

        return $rule;
    }
}
